﻿<?php
	// No direct access to this file
	defined('_JEXEC') or die('Restricted access');
	$url = $this->baseurl.'/images/com_retailshop/';	
?>
<form id="adminForm" name="adminForm" method="post">
<div id="toolbar-box">
	<div class="toolbar">
		<ul>
			<li id="toolbar-add-slideshow"><a href="index.php?option=com_retailshop&view=myshop&task=addslideshow"><span class="icon-edit"></span>Add</a></li>
			<li id="toolbar-edit-slideshow"><a href=""><span class="icon-edit"></span>Edit</a></li>
			<li id="toolbar-delete-slideshow"><a href="#"><span class="icon-delete"></span>Delete</a></li>
		</ul>
	</div>
	<div class="title">
		<h2>Slideshow Manage: Slideshow</h2>
	</div>
</div>
	
	<div id="search-box">
		<input id="search" type="text" title="Search title. Prefix with ID: to search for a product ID." placeholder="Search...">
			<button class="btn" type="submit">Search</button>
			<button onclick="document.id('search').value='';this.form.submit();">Clear</button>
	</div>
    <table width="100%">
		<thead>
			<tr>
				<th width="5%"><input type="checkbox" title="Check All" value="" name="checkall-toogle"></th>
                <th width="40%"><a href="#">Title</a></th>
                <th width="30%"><a href="#">Content</a></th>
                <th width="15%"><a href="#">Link</a></th>
                <th width="15%"><a href="#">image</a></th>
			</tr>
		</thead>
		<tbody id="table_event">
			<?php if(count($this->slideshow)>0) { ?>
			<?php foreach($this->slideshow as $slide){ 
				$temp = explode('/',$slide->image_url);		
				$img = $temp[count($temp)-1];
			?>
			<tr>
				<td><input type="checkbox" title="Check" value="<?php echo $slide->id; ?>" name="slideshow[]"></td>
				<td><?php echo $slide->title; ?></td>
				<td><?php echo $slide->content; ?></td>
				<td><?php echo $slide->link; ?></td>
				<td><image src="<?php echo $url.''.$img; ?>" width="100px" height="100px" /></td>
			</tr>
			
			<?php } } ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="5">
                    <?php if(count($this->slideshow) != 0): ?>
                    <div class="pagination">
							<div class="page">
							Page
							<select size="1" class="inputbox" name="limit" id="limit_event_page">
                              <option value="1" selected="selected">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                            </select>
						  </div>
                          <div class="limit">Display #
                            <select size="1" class="inputbox" name="limit" id="limit_event">
                              <option value="5">5</option>
                              <option value="10">10</option>
                              <option value="15">15</option>
                              <option selected="selected" value="20">20</option>
                              <option value="25">25</option>
                              <option value="30">30</option>
                              <option value="50">50</option>
                              <option value="100">100</option>
                              <option value="0">All</option>
                            </select>
                          </div>
                      	</div>
                        <?php endif; ?>
                      </td>
                  </tr>
                </tfoot>
		</table>
	</form>